<?php

namespace Igniter;

use Doctrine\Common\ClassLoader,
    Doctrine\ORM\Configuration,
    Doctrine\ORM\EntityManager,
    Doctrine\Common\Cache\ApcCache;
    // Entities\User, Entities\Address;

require BASEPATH.'database/Doctrine/Common/ClassLoader.php';

// Set up class loading. You could use different autoloaders, provided by your favorite framework,
// if you want to.
$doctrineClassLoader = new ClassLoader('Doctrine', BASEPATH.'database');
$doctrineClassLoader->register();
$entitiesClassLoader = new ClassLoader('models', APPPATH);
$entitiesClassLoader->register();
$proxiesClassLoader = new ClassLoader('cache', BASEPATH);
$proxiesClassLoader->register();

// Set up caches
$config = new Configuration;
$cache = new ApcCache;
$config->setMetadataCacheImpl($cache);
$config->setQueryCacheImpl($cache);

// Proxy configuration
$config->setProxyDir(BASEPATH . 'cache');
$config->setProxyNamespace('Proxies');

// Database connection information
$connectionOptions = array(
    'driver' => 'pdo_sqlite',
    'path' => 'database.sqlite'
);

// Create EntityManager
$em = EntityManager::create($connectionOptions, $config);

## PUT YOUR TEST CODE BELOW